pi = 0
i = 10000000
for i in range(1, i + 1):
    pi += (-1) ** (i + 1) / (2 * i - 1)
pi = pi * 4
print(pi)
